package com.fcgzs.entity;

/**
 * @Auther: ljj
 * @Description:
 */
public class Result<T> {

    private boolean flag;    //标识位
    private int code;     //状态码
    private String message;    //信息
    private T data;        //返回的数据


    public Result() {
        this.flag = true;
        this.code = StatusCode.OK;
        this.message = "操作成功";


    }

    public Result(boolean flag, int code, String message) {
        this.flag = flag;
        this.code = code;
        this.message = message;
    }

    public Result(boolean flag, int code, String message, T data) {
        this.flag = flag;
        this.code = code;
        this.message = message;
        this.data = data;
    }

    public boolean isFlag() {
        return flag;
    }

    public void setFlag(boolean flag) {
        this.flag = flag;
    }

    public int getCode() {
        return code;
    }

    public void setCode(int code) {
        this.code = code;
    }

    public String getMessage() {
        return message;
    }

    public void setMessage(String message) {
        this.message = message;
    }

    public T getData() {
        return data;
    }

    public void setData(T data) {
        this.data = data;
    }
}
